package com.fyt.controller.user.account;

import com.alibaba.fastjson.JSONObject;
import com.fyt.controller.utils.Code;
import com.fyt.controller.utils.Result;
import com.fyt.service.user.account.LoginOutService;
import com.fyt.service.user.account.LoginService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
@Api(tags="退出登录")
@RestController
public class LoginOutController {

    @Autowired
    private LoginOutService loginOutService;

    @GetMapping("/api/user/account/loginOut")
    public Result getToken(){
        Boolean aBoolean = loginOutService.loginOut();
        return new Result(aBoolean,aBoolean? Code.delete_ok:Code.delete_ok,aBoolean?"退出成功":"退出失败");
    }
}
